package cn.bone.boot01.bean;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * Created by superbone on 2018/9/24.
 */
@PropertySource(value = {"classpath:bird.properties"})
@ConfigurationProperties(prefix = "bird")
@Component
public class Bird {

    //@Value("${bird.name}")
    private String name;
//    @Value("${bird.age}")
    private Integer age;
//    @Value("${bird.money}")
    private Integer money;
//    @Value("${bird.address}")
    private String address;

    private String city;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }
}
